package com.jingdianjichi.oss.adapter;

import com.jingdianjichi.oss.entity.FileInfo;
import com.jingdianjichi.oss.utils.MinioUtil;
import lombok.SneakyThrows;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;
import java.io.InputStream;
import java.util.LinkedList;
import java.util.List;

public class AliStorageAdapterImpl implements StorageAdapter {

    @Resource
    private MinioUtil minioUtil;

    @Override
    public void createBucket(String bucket) {

    }

    @Override
    public void uploadFile(MultipartFile multipartFile, String bucket, String objectName) {

    }

    @Override
    public InputStream downloadFile(String bucket, String objectName) {
        return null;
    }

    @Override
    @SneakyThrows
    public List<String> getAllBucket() {
        List<String> ret = new LinkedList<>();
        ret.add("aliyun");
        return ret;
    }

    @Override
    public List<FileInfo> getAllFile(String bucket) {
        return null;
    }

    @Override
    public void deleteBucket(String bucket) {

    }

    @Override
    public void deleteObject(String bucket, String objectName) {

    }

    @Override
    public String getUrl(String bucket, String objectName) {
        return null;
    }
}
